﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Linq.Tests.Entities" assembly="NHibernate.Linq.Tests">
  <class name="User" table="Users"
         proxy="IUser"
         >
    <id name="Id" column="UserId" type="Int32">
      <generator class="native" />
    </id>

    <property name="Name" type="AnsiString" />
    <property name="InvalidLoginAttempts" type="Int32" />
    <property name="RegisteredAt" type="DateTime" />
    <property name="LastLoginDate" type="DateTime" />

    <property name="Enum1" type="NHibernate.Linq.Tests.Entities.EnumStoredAsStringType, NHibernate.Linq.Tests">
      <column name="Enum1" length="12" />
    </property>

    <property name="Enum2" not-null="true" />

    <many-to-one name="Role" class="Role">
      <column name="RoleId" />
    </many-to-one>

    <component name="Component" class="UserComponent">
      <property name="Property1" type="AnsiString" />
      <property name="Property2" type="AnsiString" />

      <component name="OtherComponent" class="UserComponent2">
        <property name="OtherProperty1" type="AnsiString" />
      </component>
    </component>
  </class>
</hibernate-mapping>
